<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="/asserts/js/libs/jquery/1.6/jquery.min.js" th:src="@{/asserts/js/libs/jquery/1.6/jquery.min.js}"></script>
    <script type="text/javascript" src="/asserts/js/libs/jqueryui/1.8.13/jquery-ui.min.js"  th:src="@{/asserts/js/libs/jqueryui/1.8.13/jquery-ui.min.js}"></script>

    <!-- Compressed Version
        <link type="text/css" rel="stylesheet" href="min/b=CoreAdmin&f=css/reset.css,css/style.css,css/jqueryui/jqueryui.css,js/jwysiwyg/jquery.wysiwyg.old-school.css,js/zoombox/zoombox.css" />
        <script type="text/javascript" src="min/b=CoreAdmin/js&f=cookie/jquery.cookie.js,jwysiwyg/jquery.wysiwyg.js,tooltipsy.min.js,iphone-style-checkboxes.js,excanvas.js,zoombox/zoombox.js,visualize.jQuery.js,jquery.uniform.min.js,main.js"></script>
        -->
    <link rel="stylesheet" href="/asserts/css/min.css" th:href="@{/asserts/css/min.css}" />
    <script type="text/javascript" src="js/min.js" th:src="@{/asserts/js/min.js}"></script>



<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" th:href="@{https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css}">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js" th:src="@{https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js}"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js" th:src="@{https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js}"></script>

</head>
<body>
<script type="text/javascript" src="content/settings/main.js"th:src="@{/asserts/content/settings/main.js}"></script>
<link rel="stylesheet" href="content/settings/style.css" th:href="@{/asserts/content/settings/style.css}" />
<div id="content" class="white">

    <div>
        <h1 style="display: inline-block;"><img th:src="@{/asserts/img/icons/posts.png}" alt="" /> ManagerTable</h1>
        <form method="post" th:action="@{/manager/listui}" class="form-inline">
            <table style="width: 500px; margin: 0 auto;">
                <tr>

                    <td>
                        <label>姓名</label>
                    <input type="text" name="manager_name"th:value="${qb.manager_name}"/>
                    </td>
                    <td> 状态：</td>
                    <td>
                  <select name="manager_status">
                      <option value="">请选择状态</option>
                      <option value="正常" th:selected="${qb.manager_status=='正常'}">正常</option>
                      <option value="停用" th:selected="${qb.manager_status=='停用'}">停用</option>
                   </select>
                    </td>
                    <td><button type="submit">查询</button></td>
                </tr>
            </table>
        </form>
    </div>

<div class="bloc">
    <div class="title">
        管理员信息
    </div>
    <div class="content">

<table>
    <thead>
    <tr>

        <th>管理员id</th>
        <th>管理员名称</th>
        <th>管理员角色</th>
        <th>管理员状态</th>

        <th>操作</th>
    </tr>
    <tbody>
    <!--循环展示管理员
    ${pb.list}:相当于掉用法了pageInfo类型对象的getList方法
    -->

    <tr th:each="manager:${pb.list}">

        <td th:text="${manager.manager_id}"></td>
        <td th:text="${manager.manager_name}"></td>
        <td th:text="${manager.manager_role}"></td>
        <td th:text="${manager.manager_status}"></td>
        <td>
            <a  class="btn btn-success btn-xs" th:if="${manager.manager_status=='停用'}" th:href="@{/manager/updstatus(manager_id=${manager.manager_id})}">启用</a>
            <a  class="btn btn-danger btn-xs" th:if="${manager.manager_status=='正常'}"  th:href="@{/manager/updstatus(manager_id=${manager.manager_id})}">停用</a>

            <a  class="btn btn-danger btn-xs" th:href="@{/manager/restpwd(manager_id=${manager.manager_id})}"   >重置密码</a>
        </td>
    </tr>
    </tbody>
    <tfoot>
    <tr class="pagination">
        <td colspan="4" align="center">
            <ul>
                <li style="display: inline-flex;list-style: none"><a th:href="@{/manager/listui(currentPage=${pb.pageNum-1})}">&laquo;</a></li>
                <!--1 2 3 4 5 应该循环查询pages:总页码
                 url传值： /mananer/listui?currentPage=1
                -->

                <li  style="display: inline-flex;list-style: none" th:class="${pb.pageNum==i?'active':''}" th:each="i:${#numbers.sequence(1,pb.pages)}"><a th:href="@{/manager/listui(currentPage=${i})}" th:text="${i}"></a></li>

                <li  style="display: inline-flex;list-style: none"><a th:href="@{/manager/listui(currentPage=${pb.pageNum+1})}">&raquo;</a></li>
            </ul>

        </td>

    </tr>





    </tfoot>
</table>
    </div>
    </div>
</div>
<script type="text/javascript" th:src="@{/asserts/js/jquery-1.12.3.min.js}"></script>
<script type="text/javascript" th:src="@{/asserts/js/bootstrap.min.js}"></script>
</body>
</html>